﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kopytko.BoardGame
{
    public class Pole
    {
        private int x;
        private int y;
        public Pole(int X, int Y)
        {
            x = X;
            y = Y;
        }
        public Pole(Pole pierwowzor)
        {
            x = pierwowzor.GetX();
            y = pierwowzor.GetY();
        }
        public int GetX()
        {
            return x;
        }
        public int GetY()
        {
            return y;
        }
        public static Pole operator +(Pole a, Pole b)
        {
            return new Pole(a.GetX() + b.GetX(), a.GetY() + b.GetY());
        }
        public static Pole operator -(Pole a, Pole b)
        {
            return new Pole(a.GetX() - b.GetX(), a.GetY() - b.GetY());
        }
        public static Pole operator *(Pole a, int b)
        {
            return new Pole(a.GetX() * b, a.GetY() * b);
        }
        public static Pole operator *(int b, Pole a)
        {
            return a * b;
        }
        public static bool operator ==(Pole a, Pole b)
        {
            return a.GetX() == b.GetX() && a.GetY() == b.GetY();
        }
        public static bool operator !=(Pole a, Pole b)
        {
            return !(a == b);
        }
    }
}
